Skip to content

fix: OnClientDisconnected client identifier is incorrect when pending client connection is denied [MTT-6376]#2569

Merged
NoelStephensUnity merged 10 commits intodevelopfrom
fix/client-disconnect-callback-after-denied
May 24, 2023
Merged

fix: OnClientDisconnected client identifier is incorrect when pending client connection is denied [MTT-6376]#2569
NoelStephensUnity merged 10 commits intodevelopfrom
fix/client-disconnect-callback-after-denied

Conversation

@NoelStephensUnity
Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity commented May 24, 2023

This resolves the issue where the server-host was not receiving the correct client identifier when OnClientDisconnected is invoked if a pending client is denied approval.

MTT-6376
Resolves issue #2566

Changelog

  • Fixed: issue where the OnClientDisconnected client identifier was incorrect when trigger after a pending client connection was denied.

Testing and Documentation

  • Includes integration test ClientApprovalDenied.ClientApprovalDeniedNotificationTest.
  • No documentation changes or additions were necessary.

When connection approval is enabled and a client is not approved, the OnClientDisconnected callback handler was not being invoked.
(It was when a client terminates the connection but not when the server does)
The test to validate the fix for the server-host not receiving the correct client identifier when denied approval for its pending connection.
Added additional functionality to NetcodeIntegrationTest that allows you to ignore waiting for a newly created client (i.e. not the default defined NumberOfClients) to connect.
grammar update
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review May 24, 2023 15:40
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner May 24, 2023 15:40
@NoelStephensUnity NoelStephensUnity marked this pull request as draft May 24, 2023 15:40
Comment thread com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs Outdated
renaming NetcodeIntegrationTest.WaitForNewClientToConnect to NetcodeIntegrationTest.ShouldWaitForNewClientToConnect
missed a rename of the virtual method invocation.
Adding additional validation to assure we don't get multiple disconnect notifications on the server-host side when a client is disconnected.
@NoelStephensUnity NoelStephensUnity changed the title fix: OnClientDisconnected client identifier is incorrect when pending client connection is denied fix: OnClientDisconnected client identifier is incorrect when pending client connection is denied [MTT-6376] May 24, 2023
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review May 24, 2023 18:15
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 24, 2023 18:16
@NoelStephensUnity NoelStephensUnity merged commit 7db429f into develop May 24, 2023
@NoelStephensUnity NoelStephensUnity deleted the fix/client-disconnect-callback-after-denied branch May 24, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants